#! /bin/bash

set -xue

# Clean source directory:
if [[ "$*" =~ -a ]] ; then
    rm -f doxygenloc
fi

output_dir=../../generated/doxygen
if [ ! -d $output_dir ]; then
    mkdir -p ../../generated/doxygen
    exit 0
fi

rm -f doxylog Doxyfile $output_dir/config-files.dox
rm -f *~ \#*\#

# Clean target directory:
cd $output_dir

rm -f *tmp *~ \#*\#

if [[ "$*" =~ -a ]] ; then
    rm -rf html latex
fi
